package edu.uit.se.laps.web.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "chitietdonhang")
public class CTDonHang implements Serializable{

	/**
	 *	//khong tao constructor trong lop  
	 */
	private static final long serialVersionUID = -1678093437813532230L;
	
	private int idCTDH;
	private int idDH;
	private int idSP;
	private int soLuong;
	private float donGia;
	private float thanhTien;
	
	@Id
	@GeneratedValue
	@Column(name = "idCTDH")
	public int getIdCTDH() {
		return idCTDH;
	}
	@Column(name = "idDH")
	public int getIdDH() {
		return idDH;
	}
	@Column(name = "idSP")
	public int getIdSP() {
		return idSP;
	}
	@Column(name = "SoLuong")
	public int getSoLuong() {
		return soLuong;
	}
	@Column(name = "DonGia")
	public float getDonGia() {
		return donGia;
	}
	@Column(name = "ThanhTien")
	public float getThanhTien() {
		return thanhTien;
	}
	
	public void setIdCTDH(int idCTDH) {
		this.idCTDH = idCTDH;
	}
	
	public void setIdDH(int idDH) {
		this.idDH = idDH;
	}
	
	public void setIdSP(int idSP) {
		this.idSP = idSP;
	}
	
	public void setSoLuong(int soLuong) {
		this.soLuong = soLuong;
	}
		
	public void setDonGia(float donGia) {
		this.donGia = donGia;
	}
	
	public void setThanhTien(float thanhTien) {
		this.thanhTien = thanhTien;
	}
	
//	public CTDonHang(){
//		
//	}
	
//	public CTDonHang(int idDH, int idSP, float donGia, int soLuong ,float thanhTien){
//		this.idDH = idDH;
//		this.idSP = idSP;
//		this.donGia = donGia;
//		this.soLuong = soLuong;
//		this.thanhTien = thanhTien;
//	}
	
}
